﻿using System.ComponentModel;
using CommonLibrary.Helpers;
using FileLibrary.Enums;

namespace FileLibrary.Models
{
    [Description("检修计划")]
    public class MaintenancePlan:FileModel
    {
        private string maintenanceName;
        private MaintenanceEnum maintenanceEnum;

        [Description("车组号")]
        public string TrainId { get; set; }
        [Description("检修项目序号")]
        public int MaintenanceIndex { get; set; }

        [Description("检修项目")]
        public string MaintenanceName
        {
            get { return maintenanceName; }
            set
            {
                maintenanceName = value;
                maintenanceEnum = maintenanceName.Parse<MaintenanceEnum>();
            }
        }

        [Description("检修股道")]
        public string MaintenanceTrackName { get; set; }

        [Description("检修起始时间")]
        public string MaintenanceStartTime { get; set; }

        [Description("检修结束时间")]
        public string MaintenanceStopTime { get; set; }

        public MaintenanceEnum MaintenanceEnum => maintenanceEnum;
    }
}